<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>添加典型图片</title>
<link rel="stylesheet" type="text/css" href="../css/blueprint/screen.css" media="screen, projection"/>
<link type="text/css" href="../css/redmond/jquery-ui-1.7.custom.css" rel="stylesheet" />
<script type="text/javascript" src="../script/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="../script/jquery-ui-1.7.custom.min.js"></script>
<script type="text/javascript">
    var me;
    var subPath;
    $(document).ready(function() {
        getID('FileUploader');
        $.getJSON("../common/LoadUserName.action", function(data) {
            subPath = data.subPath;
        });
    });
    function listComplete(length) {
        //$("#RESULT_SPAN").text('文件列表完毕，共有' + length + '个文件将上传');
    }
    function uploadSingleFileComplete(completeNum) {
    	//$("#RESULT_SPAN").text(completeNum + '个文件上传完毕');
    }
    function uploadAllFileComplete() {
    	//$("#RESULT_SPAN").text('所有文件上传完毕!');
        showDxtp();
    }
    function getID(swfID){
        if (navigator.appName.indexOf("Microsoft") > -1) {
            me = window[swfID];
        } else {
            me = document[swfID];
        }
    }
    function getFileUploadOption() {
    	me.initFileUpload('http://127.0.0.1:8080/Soil/common/UploadDxtp.action?subPath=' + subPath, '');
    }
    function showDxtp() {
        $.getJSON("../common/LinkDxtp.action", function(data) {
            var strArr = new Array();
            strArr.push('<ul>');
            for (var i = 0; i < data.fileLinkList.length; i++) {
                strArr.push('<li><a href="' + data.fileLinkList[i] + '" class="preview">');
                strArr.push('<img width="100" src="' + data.fileLinkList[i] + '"/>');
                strArr.push('</a></li>');
            }
            strArr.push('</ul>');
            $('#DXTP_DIV').empty().append(strArr.join(''));
        });
    }
</script>
<style type="text/css">
.style1 {
    font-size: 36px;
    font-weight: bold;
}
img {border:none;}
ul,li {
    margin:0;
    padding:0;
}
li {
    list-style:none;
    float:left;
    display:inline;
    margin-right:10px;
}
</style>
</head>
<body>
<table width="98%" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td width="20%" colspan="2"><div align="center" class="style1" >典型图片上传</div></td>
    </tr>
    <tr>
        <td height="25">
            <div align="left" style="float: left">
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                        id="FileUploader" width="520" height="262"
                        codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
                        <param name="movie" value="FileUploader.swf" />
                        <param name="quality" value="high" />
                        <param name="bgcolor" value="#869ca7" />
                        <param name="allowScriptAccess" value="sameDomain" />
                        <embed src="../swf/FileUploader.swf" quality="high" bgcolor="#869ca7"
                            width="520" height="262" name="FileUploader" align="middle"
                            play="true"
                            loop="false"
                            quality="high"
                            allowScriptAccess="sameDomain"
                            type="application/x-shockwave-flash"
                            pluginspage="http://www.adobe.com/go/getflashplayer">
                        </embed>
                </object>
            </div>
            <div style="float: left">
                <span id="RESULT_SPAN"></span>
            </div>
        </td>
    </tr>
    <tr>
        <td height="25" colspan="2">
            <p>已上传图片列表：<input type="button" value="获取典型图片" onclick="showDxtp()"/></p>
            <div id="DXTP_DIV">
            </div>
        </td>
    </tr>
</table>
</body>
</html>